<!--
  Generated template for the ChangePwdPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>修改密码</ion-title>
  </ion-navbar>

</ion-header>



<ion-content>
  <form *ngIf="accountForm" [formGroup]="accountForm">
    <ion-list>
      <ion-item>
        <ion-label floating>原密码</ion-label>
        <ion-input type="password" formControlName="old_password"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label floating>新密码</ion-label>
        <ion-input type="password" formControlName="new_password"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label floating>确认新密码</ion-label>
        <ion-input type="password" formControlName="confirm_password"></ion-input>
      </ion-item>
      <div text-center *ngIf="(new_password.hasError('minlength')) && new_password.touched">
        <p class="tip-text">*密码长度最少为六位</p>
      </div>
      <div text-center>
        <p class="tip-text">{{msgerr}}</p>
      </div>
    </ion-list>

    <div padding>
      <button color="primary" ion-button block (click)="change(accountForm.value)" [disabled]="!accountForm.valid">修改密码</button>
    </div>

  </form>
</ion-content>